package pers.gxm.strategy;

public class WinningStrategy implements Strategy{
    private boolean won;
    private Hand preHand;
    @Override
    public Hand nextHand() {
        if(!won){
//          TODO 输了直接随机出拳,生成0-2的随机数
            int ran = (int) (Math.random() * 3);
            preHand = Hand.getHand(ran);
        }
        return preHand;
    }

    @Override
    public void study(boolean win) {
        won = win;
    }
}
